package org.example.AI;

/**
 * @author: 默苍璃
 * @date: 2024-07-18 14:38
 */
public class MediatorPatternDemo {
    public static void main(String[] args) {
        ChatRoomMediator chatRoom = new ChatRoom();

        User user1 = new User("Alice", chatRoom);
        User user2 = new User("Bob", chatRoom);
        User user3 = new User("Charlie", chatRoom);

        user1.send("I am Alice!");
        user2.send("Hi, I am Bob!!");
        user3.send("Hello, I am Charlie!!!");
    }
}